package oop2.shop;

public class Vip {
	private String name, no, phone;
	private int score;

	public Vip() {

	}

	public Vip(String no, String name, String phone, int score) {
		this.name = name;
		this.no = no;
		this.phone = phone;
		this.score = score;
	}

	public void show() {
		System.out.printf("卡号-%s-姓名-%s-手机号-%s--积分-%d\n", no, name, phone, score);
	}

	// 用set get方法 读取和设置属性
	public void setScore(int s) {
		if (s < 0)
			s = 0;
		this.score = s;
	}

	public int getScore() {
		return score;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

}
